__________________________________________________________________________________________________
class Solution:
    def connectSticks(self, s: List[int]) -> int:
        heapq.heapify(s)
        ret = 0
        while len(s) > 1:
            a, b = heapq.heappop(s), heapq.heappop(s)
            ret += a + b
            heapq.heappush(s, a + b)
        return ret
__________________________________________________________________________________________________

__________________________________________________________________________________________________
